In recent years, a spin transfer torque-type magnetoresistive random access memory (STT-MRAM) has been proposed as one of semiconductor memories. In the MRAM, a magnetoresistive effect element is included in a memory cell. The magnetoresistive effect element includes two magnetic layers (ferromagnetic layers) and a nonmagnetic layer which is provided between the two magnetic layers. Depending on the magnetization states of the two magnetic layers of the magnetoresistive effect element, that is, depending on whether the spin directions of the two magnetic layers are parallel or antiparallel, “1” or “0” information is stored in the memory cell.